home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1987 July / Ahoy_Magazine_87-07_1987_Double_L_Side_A.d64 / Opt. Oscillator (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  694b  |  20 lines

  1. 0 rem << rr43-3 >>
  2. 1 rem =================================
  3. 2 print"[147]    [207]ptical [207]scillator"
  4. 3 rem      rupert report #43
  5. 4 rem  -------c64 and c128------
  6. 5 rem > drive led from motor output
  7. 6 rem (pin c-3) of cassette port.
  8. 7 rem > read cadmium sulphide photocell
  9. 8 rem from button a input (pin 6) of
  10. 9 rem joystick control port 2.
  11. 10 rem =================================
  12. 20 poke 0,peek(0) or 2^4    :rem set ddr so bit 4 of address 1 is an output.
  13. 30 poke 1,peek(1) and not 2^4 :rem clear bit 4 of address 1
  14. 40 poke 192,1:rem set $192 to keep motor off
  15. 50 l1=peek(1) and not 2^5 :rem led on
  16. 60 l0=peek(1) or 2^5      :rem led off
  17. 70 if (peek(56320) and 16)=16 then poke 1,l1 :print "on",
  18. 80 if (peek(56320) and 16)= 0 then poke 1,l0 :print "off",
  19. 90 goto 70
  20.